<template>
  <div class="HomePage">
    <el-container>
      <el-header><headerPage /></el-header>
      <el-container>
        <el-aside width="auto">
          <el-scrollbar style="height:100%">
            <menuPage @onclick="SelectMenu" />
          </el-scrollbar>
        </el-aside>
        <el-container>
          <el-main>
            <el-breadcrumb separator-class="el-icon-arrow-right">
              <el-breadcrumb-item
                v-for="Item in this.$route.matched"
                :key="Item.path"
              >
                {{ Item.name }}
              </el-breadcrumb-item>
            </el-breadcrumb>
            <router-view></router-view>
          </el-main>
          <el-footer>
            <footerPage></footerPage>
          </el-footer>
        </el-container>
      </el-container>
    </el-container>
  </div>
</template>
<script>
import menuPage from '@/components/Menu.vue'
import headerPage from '@/components/Header.vue'
import footerPage from '@/components/Footer.vue'
export default {
  components: {
    menuPage,
    headerPage,
    footerPage
  },
  name: 'HomePage',
  data () {
    return {
      list: []
    }
  },
  methods: {
    SelectMenu (key, keyPath) {
      console.log(key, keyPath)
    }
  }
}
</script>
<style scoped lang="scss">
.el-header {
  background-color:#333744;
  color: white;
  text-align: center;
  line-height: 60px;
  // border: 1px solid #ccc;
  // border-radius: 10px;
}
.el-aside {
  // margin-top: 10px;
  // border: 1px solid #ccc;
  // border-radius: 10px;
  height: calc(100vh - 60px);
  overflow-x: hidden;
  background-color:#333744
}
.el-main {
  height: calc(100vh - 120px);
  border: 1px solid #ccc;
  // border-radius: 10px;
  // margin-top: 10px;
  // margin-left: 10px;
  overflow: hidden;
}
.el-footer {
  color: white;
  text-align: center;
  // border: 1px solid #ccc;
  // border-radius: 10px;
  // margin-top: 10px;
  // margin-left: 10px;
  background-color:#333744
}
</style>
